package com.atguigu.mongo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/*==========================================
     时 间:   2021-12-07
     作 者:   刘  辉
     描 述:   尚硅谷教学团队
 ==========================================*/
@NoArgsConstructor
@AllArgsConstructor
@Data
@Document(value = "User")
public class User {
    @Id //将集合中的主键和这个列做映射
    private String id;
    private String name;
    private String email;
    private Integer age;
    private String _class;

}
